import unittest
from readfile import *

class ReadFileTestCase(unittest.TestCase):

    def test_execl_read(self):
        filedata = ExcelRead('test.xlsx').read()
        assert((filedata) == [('曾宇通','202021060101')])

    def test_csv_read(self):
        filedata = CsvRead('test.csv').read()
        assert((filedata) ==[['曾宇通','202021060101']])

    def test_zip_read(self):
        filedata = ZipRead('test.zip','test.csv').read()
        assert((filedata) ==[['曾宇通','202021060101']])
#filedata = CsvRead('example.csv').read()
#print(filedata)
unittest.main()